﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WS.DAL
{
    using SKG.DAL;
    public abstract class KinhnghiemDAL : BaseDAL, IBase
    {
        public int Count()
        {
            throw new NotImplementedException();
        }

        public object Select(string code)
        {
            throw new NotImplementedException();
        }

        public System.Data.DataTable Select(Guid fKey)
        {
            throw new NotImplementedException();
        }

        public System.Data.DataTable Select(object obj = null, int skip = 0, int take = 0)
        {
            throw new NotImplementedException();
        }

        public object Insert(object obj)
        {
            return _sqlMapper.Insert("Kinhnghiem_Insert", obj);
        }

        public object Update(object obj)
        {
            return _sqlMapper.Update("Kinhnghiem_Update", obj);
        }

        public object Delete(Guid id = new Guid())
        {
            try
            {
                return _sqlMapper.Delete("Kinhnghiem_Delete", id);
            }
            catch (Exception)
            {
                return 0;
            }
        }

        public System.Data.DataTable Select_By_Ungvien_Id(Guid id)
        {
            return Mapper.QueryForDataTable("Kinhnghiem_By_Ungvien_Id", id);
        }
    }
}
